package org.JingDong.controller;

import com.alibaba.cola.dto.SingleResponse;
import com.lizemin.spring.annotation.GetMapping;
import com.lizemin.spring.annotation.RequestMapping;
import com.lizemin.spring.annotation.RestController;
import com.lizemin.spring.annotation.Value;

/**
 * @author lzm
 * @date 2025/4/26 13:00
 * @description
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Value("server.port")
    private Integer port;

    @GetMapping("/heartbeat")
    public SingleResponse<String> heartBeat() {
        return SingleResponse.of("OK");
    }

    @GetMapping("/getServerPort")
    public SingleResponse<Integer> getServerPort() {
        return SingleResponse.of(port);
    }

}
